package com.sheep.jucdemo.part1.part1_10;

/**
 * @Date 2022/4/7 0:05
 * @Created by sheep
 */
public class Test1_10_1 {

    public static void main(String[] args) {
        Thread thread = new Thread(new Runnable() {
            @Override
            public void run() {
                for (; ; ) {

                }
            }
        });
        // 设置为守护线程
        thread.setDaemon(true);
        // 启动子线程
        thread.start();
        System.out.println("main thread is over");
    }
}
